/* 
 * blame: christopher taylor (christopher(dot)paul(dot)taylor(at)gmail(dot)com
 * released under terms of MPL (Mozilla Public License) 1.1 http://www.mozilla.org/MPL/
*/

#include <boost/python.hpp>
#include <boost/shared_ptr.hpp>
using namespace boost::python;

#include "levenshtein.h"

int pylevenshtein_distance(boost::python::str s, boost::python::str t) {
	char const* s_c_str = extract<char const*>(s);
	char const* t_c_str = extract<char const*>(t);
	return levenshtein_distance(s_c_str, t_c_str);
}

BOOST_PYTHON_MODULE(pylevenshtein)
{
	def("pylevenshtein_distance", pylevenshtein_distance, args("s", "t"), "Compute levenshtein distance between s and t");
}
